Skip to content

feat: update book for DragonRuby v7 - #38

Merged
brettchalupa merged 1 commit into
mainfrom
drgtk-v7
May 17, 2026
Merged

brettchalupa merged 1 commit into
mainfrom
drgtk-v7

Conversation

@brettchalupa

Copy link
Copy Markdown
Member

Modernizes all 12 chapters to match what readers see when they unzip
DragonRuby v7.x:

  • Replaces chapter_01/01_default with the actual v7.1 hello world
    (uses module Main, size_px, anchor_x/anchor_y, Kernel.tick_count).
  • Rewrites the Chapter 1 walkthrough to match.
  • Converts every positional array primitive ([x, y, w, h, path],
    [x, y, text, size, align]) to hash form across chapters 1-12.
  • Replaces size_enum with size_px using the docs' formula
    (size_px = 22 + 2 * size_enum).
  • Replaces alignment_enum / vertical_alignment_enum with anchor_x /
    anchor_y.
  • Switches args.state.tick_count to Kernel.tick_count.
  • Rework Chapter 3's "switching to hashes" arc into "a closer look
    at hashes" + "refactoring the player into a hash" since fireballs
    are now hashes from the start.
  • Introduces module Main as a refactor step in Chapter 11; wrap the
    refactor, title, and release samples (chapters 11-12) in it.
  • Updates mdbook to latest version.

Lots of find and replace. But I did manually test all changed code
examples with DR v7.1, so hoping this is all good!

Modernizes all 12 chapters to match what readers see when they unzip
DragonRuby v7.x:

- Replaces chapter_01/01_default with the actual v7.1 hello world
  (uses module Main, size_px, anchor_x/anchor_y, Kernel.tick_count).
- Rewrites the Chapter 1 walkthrough to match.
- Converts every positional array primitive ([x, y, w, h, path],
  [x, y, text, size, align]) to hash form across chapters 1-12.
- Replaces size_enum with size_px using the docs' formula
  (size_px = 22 + 2 * size_enum).
- Replaces alignment_enum / vertical_alignment_enum with anchor_x /
  anchor_y.
- Switches args.state.tick_count to Kernel.tick_count.
- Rework Chapter 3's "switching to hashes" arc into "a closer look
  at hashes" + "refactoring the player into a hash" since fireballs
  are now hashes from the start.
- Introduces module Main as a refactor step in Chapter 11; wrap the
  refactor, title, and release samples (chapters 11-12) in it.
- Updates mdbook to latest version.

Lots of find and replace. But I did manually test all changed code
examples with DR v7.1, so hoping this is all good!
@brettchalupa
brettchalupa merged commit 3c4b573 into main May 17, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant